package com.disgnpattern.learn.chapter10;

/**
 * @author dxy
 * @version 1.0
 * @date 2021/10/24 18:23
 * @decripton 测试方法
 * @mail victorydeng@163.com
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("------学生a的试卷start-------");
        ExamPaper studentAsPaper = new StudentAsPaper(); //利用多态 子类声明改成父类
        studentAsPaper.question1();
        studentAsPaper.question2();
        studentAsPaper.question3();
        System.out.println("------学生a的试卷end-------");

        System.out.println("------学生b的试卷start-------");
        ExamPaper studentBsPaper = new StudentBsPaper();
        studentBsPaper.question1();
        studentBsPaper.question2();
        studentBsPaper.question3();
        System.out.println("------学生b的试卷end-------");
    }
}
